﻿<!DOCTYPE html>
<!--作业许可证管理=>作业许可证申请=>受影响相关方添加页 -->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>


</head>
<body>


    
<div id="app" v-cloak>   

        <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px" size="mini">

            <div style="width:100%;text-align:center ">
                <label style="font-weight:bold">
                    {{JSPAnalyticalManagement.Steps}}
                </label>
            </div>
            <el-row>

                <el-col :sqpn="13">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input type="text" v-model="Form.Steps" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{JSPAnalyticalManagement.Steps+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <el-row type="flex" justify="center">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm">{{col.btnConfirm}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">

        var app = new Vue({
            el: '#app',
            data: {
                //父业传参 
                id: '',
                //业务表单内容
                Form: {
                    Steps: '',

                },
                unitDepartment: [],
                PeopleList: [],
                //表单验证
                rules: {
                    unit: [
                        verification.NotNull                   
                    ],
                    unitPeople: [
                        verification.NotNull
                    ]
                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //提交数据
                onSubmitForm: function () {
                    switch (this.id) {
                        case "1":
                            parent.app.Form.OperationRelatedActivitiesRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 0,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;

                        case "2":
                            parent.app.Form.ActivityRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 1,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;

                        case "3":
                            parent.app.Form.OperatingProcedureRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 2,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;
                        case "4":
                            parent.app.Form.InspectionMaintenanceActivitiesRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 3,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;
                        case "5":
                            parent.app.Form.EquipmentFacilitiesRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 4,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;
                        case "6":
                            parent.app.Form.ProcessMediumRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 5,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;
                        case "7":
                            parent.app.Form.PlaceEnvironmentRish.push({
                                RiskStepsName: this.Form.Steps,
                                RiskStepsId: Mock.Random.id(),
                                RiskTypeId: 6,
                                List: [],
                            });
                            parent.app.ListItem.dialogVisible = false;
                            break;
                    }
                  
                }
            },
            mounted: function () {
                this.id = getUrlParam("Steps");
            },
        });
    </script>
</body>
</html>